{% load staticfiles %}

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Maisonnette</title>
    <link rel="stylesheet" type="text/css" href="{% static 'mathtest/css/style.css' %}"/>
    <link rel="stylesheet" type="text/css" href="{% static 'mathtest/css/perfect-scrollbar.min.css' %}"/>
    <link rel="stylesheet" type="text/css" href="{% static 'mathtest/css/theme-switcher.min.css' %}"/>
    <link type="text/css" href="{% static 'mathtest/css/app.css' %}" rel="stylesheet">
    <style>
        .help-block {
        color: red;
        }


    </style>

</head>

<body>
{% if user.is_authenticated%}
<nav class="navbar navbar-expand navbar-dark mai-top-header">
    <div class="container"><a href="#" class="navbar-brand"></a>
        <!--Left Menu-->
        <ul class="nav navbar-nav mai-top-nav">
            <li class="nav-item"><a href="#" class="nav-link">Home</a></li>
            <li class="nav-item"><a href="#" class="nav-link">About</a></li>
            <li class="nav-item dropdown"><a href="#" data-toggle="dropdown" role="button" aria-expanded="false"
                                             class="nav-link dropdown-toggle">Services <span
                    class="angle-down s7-angle-down"></span></a>
                <div role="menu" class="dropdown-menu"><a href="#" class="dropdown-item">Information</a><a href="#"
                                                                                                           class="dropdown-item">Company</a><a
                        href="#" class="dropdown-item">Documentation</a><a href="#" class="dropdown-item">API
                    Settings</a><a href="#" class="dropdown-item">Export Info</a></div>
            </li>
            <li class="nav-item"><a href="#" class="nav-link">Support</a></li>
        </ul>
        <!--Icons Menu-->
        <ul class="navbar-nav float-lg-right mai-icons-nav">
            <li class="dropdown nav-item mai-messages"><a href="#" data-toggle="dropdown" role="button"
                                                          aria-expanded="false" class="nav-link dropdown-toggle"><span
                    class="icon s7-comment"></span></a>
                <ul class="dropdown-menu">
                    <li>
                        <div class="title">Messages</div>
                        <div class="mai-scroller">
                            <div class="content">
                                <ul>
                                    <li><a href="#">
                                        <div class="img"><img src=""></div>
                                        <div class="content"><span class="date">16 Sept</span><span class="name">Victor Jara</span><span
                                                class="desc">The song that has been brave, will always be the new song. </span>
                                        </div>
                                    </a></li>
                                    <li><a href="#">
                                        <div class="img"><img src=""></div>
                                        <div class="content"><span class="date">4 Sept</span><span class="name">Gustavo Cerati</span><span
                                                class="desc">You will see me fly across the city of fury where no one knows of me.</span>
                                        </div>
                                    </a></li>
                                    <li><a href="#">
                                        <div class="img"><img src=""></div>
                                        <div class="content"><span class="date">13 Aug</span><span class="name">Jaime Garzón</span><span
                                                class="desc">Now everything came back to the abnormality.</span></div>
                                    </a></li>
                                    <li><a href="#">
                                        <div class="img"><img src=""></div>
                                        <div class="content"><span class="date">13 Aug</span><span class="name">Allen Collins</span><span
                                                class="desc">Things just couldn't even be the same 'Cause I'm as free as a bird now.</span>
                                        </div>
                                    </a></li>
                                </ul>
                            </div>
                        </div>
                        <div class="footer"><a href="#">View all messages</a></div>
                    </li>
                </ul>
            </li>
            <li class="dropdown nav-item mai-notifications"><a href="#" data-toggle="dropdown" role="button"
                                                               aria-expanded="false"
                                                               class="nav-link dropdown-toggle"><span
                    class="icon s7-bell"></span><span class="indicator"></span></a>
                <ul class="dropdown-menu">
                    <li>
                        <div class="title">Notifications</div>
                        <div class="mai-scroller">
                            <div class="content">
                                <ul>
                                    <li><a href="#">
                                        <div class="icon"><span class="s7-check"></span></div>
                                        <div class="content"><span class="desc">This is a new message for my dear friend <strong>Rob</strong>.</span><span
                                                class="date">10 minutes ago</span></div>
                                    </a></li>
                                    <li><a href="#">
                                        <div class="icon"><span class="s7-add-user"></span></div>
                                        <div class="content"><span class="desc">You have a new fiend request pending from <strong>John Doe</strong>.</span><span
                                                class="date">2 days ago</span></div>
                                    </a></li>
                                    <li><a href="#">
                                        <div class="icon"><span class="s7-graph1"></span></div>
                                        <div class="content"><span class="desc">Your site visits have increased <strong>15.5%</strong> more since the last week.</span><span
                                                class="date">2 hours ago</span></div>
                                    </a></li>
                                    <li><a href="#">
                                        <div class="icon"><span class="s7-check"></span></div>
                                        <div class="content"><span class="desc">This is a new message for my dear friend <strong>Rob</strong>.</span><span
                                                class="date">10 minutes ago</span></div>
                                    </a></li>
                                </ul>
                            </div>
                        </div>
                        <div class="footer"><a href="#">View all notifications</a></div>
                    </li>
                </ul>
            </li>
            <li class="dropdown nav-item mai-settings"><a href="#" data-toggle="dropdown" role="button"
                                                          aria-expanded="false" class="nav-link dropdown-toggle"><span
                    class="icon s7-settings"></span></a>
                <ul class="dropdown-menu">
                    <li>
                        <div class="title">Settings</div>
                        <div class="content">
                            <ul>
                                <li><span>Enable Notifications</span>
                                    <div class="float-right">
                                        <div class="switch-button switch-button-sm">
                                            <input type="checkbox" checked="" name="check" id="switch1"><span>
                            <label for="switch1"></label></span>
                                        </div>
                                    </div>
                                </li>
                                <li><span>Auto Commit</span>
                                    <div class="float-right">
                                        <div class="switch-button switch-button-sm">
                                            <input type="checkbox" checked="" name="check2" id="switch2"><span>
                            <label for="switch2"></label></span>
                                        </div>
                                    </div>
                                </li>
                                <li><span>Sidebar</span>
                                    <div class="float-right">
                                        <div class="switch-button switch-button-sm">
                                            <input type="checkbox" name="check3" id="switch3"><span>
                            <label for="switch3"></label></span>
                                        </div>
                                    </div>
                                </li>
                                <li><span>Full-width Layout</span>
                                    <div class="float-right">
                                        <div class="switch-button switch-button-sm">
                                            <input type="checkbox" checked="" name="check4" id="switch4"><span>
                            <label for="switch4"></label></span>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </li>
                </ul>
            </li>
        </ul>
        <!--User Menu-->
        <ul class="nav navbar-nav float-lg-right mai-user-nav">
            <li class="dropdown nav-item"><a href="#" data-toggle="dropdown" role="button" aria-expanded="false"
                                             class="dropdown-toggle nav-link"> <img
                    src="{% static 'mathtest/img/p.png' %}"><span class="user-name">{{request.user}}</span><span
                    class="angle-down s7-angle-down"></span></a>
                <div role="menu" class="dropdown-menu"><a href="#" class="dropdown-item"><span
                        class="icon s7-home"></span>My Account</a><a href="pages-profile.php"
                                                                     class="dropdown-item"><span
                        class="icon s7-user"> </span>Profile</a><a href="#" class="dropdown-item"> <span
                        class="icon s7-cash"> </span>Billing</a><a href="#" class="dropdown-item"> <span
                        class="icon s7-tools"> </span>Settings</a><a href="{%url 'accounts:logout' %}"
                                                                     class="dropdown-item"><span
                        class="icon s7-power"> </span>Log Out</a></div>
            </li>
        </ul>
    </div>
</nav>
<div class="mai-wrapper">
    <nav class="navbar navbar-expand-lg mai-sub-header">
        <div class="container">
            <!-- Mega Menu structure-->
            <nav class="navbar navbar-expand-md">
                <button type="button" data-toggle="collapse" data-target="#mai-navbar-collapse"
                        aria-controls="#mai-navbar-collapse" aria-expanded="false" aria-label="Toggle navigation"
                        class="navbar-toggler hidden-md-up collapsed">
                    <div class="icon-bar"><span></span><span></span><span></span></div>
                </button>
                <div id="mai-navbar-collapse" class="navbar-collapse collapse mai-nav-tabs">
                    <ul class="nav navbar-nav">
                        <li class="nav-item parent {{home}}"><a href="#" role="button" aria-expanded="false"
                                                                class="nav-link"><span
                                class="icon s7-home"></span><span>主页</span></a>
                            <ul class="mai-nav-tabs-sub mai-sub-nav nav">
                                <li class="nav-item"><a href="{%url 'mathtest:mistakepracticeresult' %}"
                                                        class="nav-link {{stats}}"><span
                                        class="icon s7-monitor"></span><span class="name">统计</span></a>
                                </li>


                            </ul>
                        </li>
                        <li class="nav-item parent {{oneunknow}}">
                            <a href="#" role="button" aria-expanded="false"
                               class="nav-link"><span
                                    class="icon s7-magic-wand"></span><span>一元一次方程</span></a>
                            <ul class="mai-nav-tabs-sub mai-sub-nav nav">

                                <li class="nav-item"><a href="{% url 'mathtest:OUtestresult' %}"
                                                        class="nav-link {{OUtestresult}}"><span
                                        class="icon s7-monitor"></span><span class="name">测试结果</span></a>
                                </li>
                                <li class="nav-item dropdown"><a href="#" data-toggle="dropdown" role="button"
                                                                 aria-expanded="false"
                                                                 class="nav-link dropdown-toggle {{OUtestgen}}">生成习题
                                    <span
                                            class="angle-down"></span></a>
                                    <div role="menu" class="dropdown-menu"><a href="{%url 'mathtest:OUtestgen' 1 %}"
                                                                              class="dropdown-item">第一关</a><a
                                            href="{%url 'mathtest:OUtestgen' 2 %}"
                                            class="dropdown-item">第二关</a><a
                                            href="{%url 'mathtest:OUtestgen' 3 %}" class="dropdown-item">第三关</a></div>
                                </li>


                            </ul>

                        </li>
                        <li class="nav-item parent {{wrongset}}"><a href="#"
                                                                    role="button"
                                                                    aria-expanded="false"
                                                                    class="nav-link"><span
                                class="icon s7-tools"></span><span>错题集</span></a>
                            <ul class="mai-nav-tabs-sub mai-sub-nav nav">

                                <li class="nav-item"><a href="{% url 'mathtest:mistakelist' %}"
                                                        class="nav-link {{wrongsetlist}}"><span
                                        class="icon s7-monitor"></span><span class="name">错题列表</span></a>
                                </li>

                                <li class="nav-item"><a href="{% url 'mathtest:mistakecreate' %}"
                                                        class="nav-link {{wrongsetadd}}"><span
                                        class="icon s7-monitor"></span><span class="name">新增错题</span></a>
                                </li>
                                <li class="nav-item dropdown"><a href="#" data-toggle="dropdown" role="button"
                                                                 aria-expanded="false"
                                                                 class="nav-link dropdown-toggle {{mistakepratice}}">错题练习
                                    <span
                                            class="angle-down"></span></a>

                                    <div role="menu" class="dropdown-menu">
                                        {% for topic in topics%}
                                        <a href="{%url 'mathtest:mistakepractice' topic.id %}" class="dropdown-item">{{topic}}</a>
                                        {%endfor%}
                                    </div>
                                </li>
                                <li class="nav-item"><a href="{% url 'mathtest:mistakepracticeresult' %}"
                                                        class="nav-link {{mistakepracticeresult}}"><span
                                        class="icon s7-monitor"></span><span class="name">练习结果</span></a>
                                </li>
                                <li class="nav-item"><a href="{% url 'mathtest:mistakearchivelist' %}"
                                                        class="nav-link {{mistakearchivelist}}"><span
                                        class="icon s7-monitor"></span><span class="name">归档错题列表</span></a>
                                </li>


                            </ul>
                        </li>
                        <li class="nav-item parent {{exam}}">
                            <a href="#" role="button" aria-expanded="false"
                               class="nav-link"><span
                                    class="icon s7-news-paper"></span><span>试卷</span></a>
                            <ul class="mai-nav-tabs-sub mai-sub-nav nav">

                                <li class="nav-item"><a href="{% url 'mathtest:examadd' %}"
                                                        class="nav-link {{examadd}}"><span
                                        class="icon s7-monitor"></span><span class="name">新增试卷</span></a>
                                </li>
                                <li class="nav-item"><a href="{% url 'mathtest:examlist' %}"
                                                        class="nav-link {{examlist}}"><span
                                        class="icon s7-monitor"></span><span class="name">试卷练习</span></a>
                                </li>
                                <li class="nav-item dropdown"><a href="#" data-toggle="dropdown" role="button"
                                                                 aria-expanded="false"
                                                                 class="nav-link dropdown-toggle {{OUtestgen}}">生成习题
                                    <span
                                            class="angle-down"></span></a>
                                    <div role="menu" class="dropdown-menu"><a href="#"
                                                                              class="dropdown-item">第一关</a><a
                                            href="#"
                                            class="dropdown-item">第二关</a><a
                                            href="#" class="dropdown-item">第三关</a></div>
                                </li>


                            </ul>

                        </li>


                    </ul>
                    </li>
                    </ul>
                </div>
            </nav>
            <!--Search input-->
            <div class="search">
                <input type="text" placeholder="Search..." name="q"><span class="s7-search"></span>
            </div>
        </div>
    </nav>
    {%endif%}
    {% include "messages_display.html" %}
    {% block body %}
    {% endblock %}
</div>
<!--<script src="{% static 'mathtest/js/jquery.min.js' %}" type="text/javascript"></script>-->
<script src="http://code.jquery.com/jquery-1.12.2.min.js"
        integrity="sha256-lZFHibXzMHo3GGeehn1hudTAP3Sc0uKXBXAzHX1sjtk=" crossorigin="anonymous"></script>
<script src="{% static 'mathtest/js/perfect-scrollbar.jquery.min.js' %}" type="text/javascript"></script>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.perfect-scrollbar/1.4.0/perfect-scrollbar.js" type="text/javascript"></script>-->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" type="text/javascript"></script>
<script src="{% static 'mathtest/js/app.js' %}" type="text/javascript"></script>
<script src="{% static 'mathtest/js/theme-switcher.min.js' %}" type="text/javascript"></script>
<script src="https://unpkg.com/ionicons@4.2.4/dist/ionicons.js"></script>
{% block extendscript%}
{% endblock %}
<script type="text/javascript">
      $(document).ready(function(){
      	//initialize the javascript
      	App.init();
      });
      $(document).ready(function(){
      	App.livePreview();
      });
    $(window).on('load',function(){
        $('#myModal').modal('show');
    });


</script>

</body>
</html>